<?php  
namespace Admin\Model;
use Think\Model;
class FriendModel extends Model{

    protected $tableName = 'friend';
    //自动验证
    protected $_validate = array(
          array('title','require','友链标题必须填写！'), 
          array('des','require','友链描述必须填写！'), 
          array('url','url','URL格式错误！',2),   
    );
    protected $_auto = array(
        array('endtime', 'strtotime', 1, 'function'),
        array('ctime', 'strtotime', 1, 'function'),
    );

}